<template>
  <div>
    <el-form :model="companyform">
      <el-form-item label="公司名称：" :label-width="formLabelWidth">
        <el-input :readonly="true" v-model="companyform.bCompanyName" autocomplete="off"></el-input>
      </el-form-item>
      <el-form-item label="公司位置：" :label-width="formLabelWidth">
        <el-input :readonly="true" v-model="companyform.bCompanyPosition" autocomplete="off"></el-input>
      </el-form-item>
      <el-form-item label="公司负责人：" :label-width="formLabelWidth">
        <el-input
          :readonly="true"
          v-model="companyform.bCompanyPerson"
          type="textarea"
          autocomplete="off"
        ></el-input>
      </el-form-item>
      <el-form-item label="联系方式：" :label-width="formLabelWidth">
        <el-input
          :readonly="true"
          v-model="companyform.bCompanyContact"
          type="textarea"
          autocomplete="off"
        ></el-input>
      </el-form-item>
      <el-form-item label="种植品种：" :label-width="formLabelWidth">
        <el-input
          :readonly="true"
          v-model="companyform.bCompanyMedicinal"
          type="textarea"
          autocomplete="off"
        ></el-input>
      </el-form-item>
      <el-form-item label="公司简介：" :label-width="formLabelWidth">
        <el-input
          :readonly="true"
          v-model="companyform.bCompanyRemarks"
          type="textarea"
          rows="4"
          autocomplete="off"
        ></el-input>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "company-form",
  props: {
    companyformData: {
      type: Object
    }
  },
  data() {
    return {
      companyform: {
        bCompanyName: "",
        bCompanyPosition: "",
        bCompanyPerson: "",
        bCompanyContact: "",
        bCompanyMedicinal: "",
        bCompanyRemarks: ""
      },
      formLabelWidth: "120px"
    };
  },
  watch: {
    companyformData: {
      immediate: true,
      handler(val) {
        this.companyform = val;
      }
    }
  }
};
</script>